#ifndef __cplusplus
#include "stdlib.h"
#endif
#include "string.h"

#include "tolua++.h"

/* Exported function */
TOLUA_API int  tolua_luaQBrush_open (lua_State* tolua_S);

#include "./../luaQt.h"
#include "./../luaQBrush.h"

/* function to release collected object via destructor */
#ifdef __cplusplus

static int tolua_collect_QVariant (lua_State* tolua_S)
{
 QVariant* self = (QVariant*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}

static int tolua_collect_QBrush (lua_State* tolua_S)
{
 QBrush* self = (QBrush*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}

static int tolua_collect_QColor (lua_State* tolua_S)
{
 QColor* self = (QColor*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}
#endif


/* function to register type */
static void tolua_reg_types (lua_State* tolua_S)
{
 tolua_usertype(tolua_S,"QColor");
 tolua_usertype(tolua_S,"QImage");
 tolua_usertype(tolua_S,"QBrush");
 tolua_usertype(tolua_S,"QVariant");
 tolua_usertype(tolua_S,"QGradient");
 tolua_usertype(tolua_S,"QPixmap");
}

/* method: new of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new00
static int tolua_luaQBrush_QBrush_new00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new00_local
static int tolua_luaQBrush_QBrush_new00_local(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new01
static int tolua_luaQBrush_QBrush_new01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  Qt::BrushStyle bs = ((Qt::BrushStyle) (int)  tolua_tonumber(tolua_S,2,0));
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)(bs));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQBrush_QBrush_new00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new01_local
static int tolua_luaQBrush_QBrush_new01_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  Qt::BrushStyle bs = ((Qt::BrushStyle) (int)  tolua_tonumber(tolua_S,2,0));
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)(bs));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQBrush_QBrush_new00_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new02
static int tolua_luaQBrush_QBrush_new02(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QColor",0,&tolua_err)) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const QColor* color = ((const QColor*)  tolua_tousertype(tolua_S,2,0));
  Qt::BrushStyle tolua_var_1 = ((Qt::BrushStyle) (int)  tolua_tonumber(tolua_S,3,0));
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)(*color,tolua_var_1));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQBrush_QBrush_new01(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new02_local
static int tolua_luaQBrush_QBrush_new02_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QColor",0,&tolua_err)) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const QColor* color = ((const QColor*)  tolua_tousertype(tolua_S,2,0));
  Qt::BrushStyle tolua_var_1 = ((Qt::BrushStyle) (int)  tolua_tonumber(tolua_S,3,0));
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)(*color,tolua_var_1));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQBrush_QBrush_new01_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new03
static int tolua_luaQBrush_QBrush_new03(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  Qt::GlobalColor color = ((Qt::GlobalColor) (int)  tolua_tonumber(tolua_S,2,0));
  Qt::BrushStyle tolua_var_2 = ((Qt::BrushStyle) (int)  tolua_tonumber(tolua_S,3,0));
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)(color,tolua_var_2));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQBrush_QBrush_new02(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new03_local
static int tolua_luaQBrush_QBrush_new03_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  Qt::GlobalColor color = ((Qt::GlobalColor) (int)  tolua_tonumber(tolua_S,2,0));
  Qt::BrushStyle tolua_var_2 = ((Qt::BrushStyle) (int)  tolua_tonumber(tolua_S,3,0));
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)(color,tolua_var_2));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQBrush_QBrush_new02_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new04
static int tolua_luaQBrush_QBrush_new04(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QColor",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const QColor* color = ((const QColor*)  tolua_tousertype(tolua_S,2,0));
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)(*color));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQBrush_QBrush_new03(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new04_local
static int tolua_luaQBrush_QBrush_new04_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QColor",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const QColor* color = ((const QColor*)  tolua_tousertype(tolua_S,2,0));
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)(*color));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQBrush_QBrush_new03_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new05
static int tolua_luaQBrush_QBrush_new05(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  Qt::GlobalColor color = ((Qt::GlobalColor) (int)  tolua_tonumber(tolua_S,2,0));
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)(color));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQBrush_QBrush_new04(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new05_local
static int tolua_luaQBrush_QBrush_new05_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  Qt::GlobalColor color = ((Qt::GlobalColor) (int)  tolua_tonumber(tolua_S,2,0));
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)(color));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQBrush_QBrush_new04_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new06
static int tolua_luaQBrush_QBrush_new06(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QPixmap",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const QPixmap* pixmap = ((const QPixmap*)  tolua_tousertype(tolua_S,2,0));
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)(*pixmap));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQBrush_QBrush_new05(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new06_local
static int tolua_luaQBrush_QBrush_new06_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QPixmap",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const QPixmap* pixmap = ((const QPixmap*)  tolua_tousertype(tolua_S,2,0));
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)(*pixmap));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQBrush_QBrush_new05_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new07
static int tolua_luaQBrush_QBrush_new07(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QImage",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const QImage* image = ((const QImage*)  tolua_tousertype(tolua_S,2,0));
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)(*image));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQBrush_QBrush_new06(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new07_local
static int tolua_luaQBrush_QBrush_new07_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QImage",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const QImage* image = ((const QImage*)  tolua_tousertype(tolua_S,2,0));
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)(*image));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQBrush_QBrush_new06_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new08
static int tolua_luaQBrush_QBrush_new08(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QBrush",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const QBrush* brush = ((const QBrush*)  tolua_tousertype(tolua_S,2,0));
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)(*brush));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQBrush_QBrush_new07(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new08_local
static int tolua_luaQBrush_QBrush_new08_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QBrush",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const QBrush* brush = ((const QBrush*)  tolua_tousertype(tolua_S,2,0));
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)(*brush));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQBrush_QBrush_new07_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new09
static int tolua_luaQBrush_QBrush_new09(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QGradient",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const QGradient* gradient = ((const QGradient*)  tolua_tousertype(tolua_S,2,0));
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)(*gradient));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQBrush_QBrush_new08(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_new09_local
static int tolua_luaQBrush_QBrush_new09_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QBrush",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QGradient",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const QGradient* gradient = ((const QGradient*)  tolua_tousertype(tolua_S,2,0));
  {
   QBrush* tolua_ret = (QBrush*)  Mtolua_new((QBrush)(*gradient));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QBrush");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaQBrush_QBrush_new08_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: delete of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_delete00
static int tolua_luaQBrush_QBrush_delete00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"QBrush",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  QBrush* self = (QBrush*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'", NULL);
#endif
  Mtolua_delete(self);
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'delete'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: operatorQVariant of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush__QVariant00
static int tolua_luaQBrush_QBrush__QVariant00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const QBrush",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const QBrush* self = (const QBrush*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'operatorQVariant'", NULL);
#endif
  {
   QVariant tolua_ret = (QVariant)  self->operator  QVariant();
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((QVariant)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"QVariant");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(QVariant));
     tolua_pushusertype(tolua_S,tolua_obj,"QVariant");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function '.QVariant'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: style of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_style00
static int tolua_luaQBrush_QBrush_style00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const QBrush",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const QBrush* self = (const QBrush*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'style'", NULL);
#endif
  {
   Qt::BrushStyle tolua_ret = (Qt::BrushStyle)  self->style();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'style'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: setStyle of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_setStyle00
static int tolua_luaQBrush_QBrush_setStyle00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"QBrush",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  QBrush* self = (QBrush*)  tolua_tousertype(tolua_S,1,0);
  Qt::BrushStyle tolua_var_3 = ((Qt::BrushStyle) (int)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setStyle'", NULL);
#endif
  {
   self->setStyle(tolua_var_3);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'setStyle'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: color of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_color00
static int tolua_luaQBrush_QBrush_color00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"QBrush",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  QBrush* self = (QBrush*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'color'", NULL);
#endif
  {
   QColor tolua_ret = (QColor)  self->color();
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((QColor)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"QColor");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(QColor));
     tolua_pushusertype(tolua_S,tolua_obj,"QColor");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'color'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: setColor of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_setColor00
static int tolua_luaQBrush_QBrush_setColor00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"QBrush",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const QColor",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  QBrush* self = (QBrush*)  tolua_tousertype(tolua_S,1,0);
  const QColor* color = ((const QColor*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setColor'", NULL);
#endif
  {
   self->setColor(*color);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'setColor'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: setColor of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_setColor01
static int tolua_luaQBrush_QBrush_setColor01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"QBrush",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  QBrush* self = (QBrush*)  tolua_tousertype(tolua_S,1,0);
  Qt::GlobalColor color = ((Qt::GlobalColor) (int)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'setColor'", NULL);
#endif
  {
   self->setColor(color);
  }
 }
 return 0;
tolua_lerror:
 return tolua_luaQBrush_QBrush_setColor00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: gradient of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_gradient00
static int tolua_luaQBrush_QBrush_gradient00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const QBrush",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const QBrush* self = (const QBrush*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'gradient'", NULL);
#endif
  {
   const QGradient* tolua_ret = (const QGradient*)  self->gradient();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"const QGradient");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'gradient'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: isOpaque of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_isOpaque00
static int tolua_luaQBrush_QBrush_isOpaque00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const QBrush",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const QBrush* self = (const QBrush*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'isOpaque'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->isOpaque();
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'isOpaque'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: isDetached of class  QBrush */
#ifndef TOLUA_DISABLE_tolua_luaQBrush_QBrush_isDetached00
static int tolua_luaQBrush_QBrush_isDetached00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const QBrush",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const QBrush* self = (const QBrush*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'isDetached'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->isDetached();
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'isDetached'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* Open function */
TOLUA_API int tolua_luaQBrush_open (lua_State* tolua_S)
{
 tolua_open(tolua_S);
 tolua_reg_types(tolua_S);
 tolua_module(tolua_S,NULL,0);
 tolua_beginmodule(tolua_S,NULL);
  tolua_module(tolua_S,"Qt",0);
  tolua_beginmodule(tolua_S,"Qt");
   tolua_constant(tolua_S,"color0",Qt::color0);
   tolua_constant(tolua_S,"color1",Qt::color1);
   tolua_constant(tolua_S,"black",Qt::black);
   tolua_constant(tolua_S,"white",Qt::white);
   tolua_constant(tolua_S,"darkGray",Qt::darkGray);
   tolua_constant(tolua_S,"gray",Qt::gray);
   tolua_constant(tolua_S,"lightGray",Qt::lightGray);
   tolua_constant(tolua_S,"red",Qt::red);
   tolua_constant(tolua_S,"green",Qt::green);
   tolua_constant(tolua_S,"blue",Qt::blue);
   tolua_constant(tolua_S,"cyan",Qt::cyan);
   tolua_constant(tolua_S,"magenta",Qt::magenta);
   tolua_constant(tolua_S,"yellow",Qt::yellow);
   tolua_constant(tolua_S,"darkRed",Qt::darkRed);
   tolua_constant(tolua_S,"darkGreen",Qt::darkGreen);
   tolua_constant(tolua_S,"darkBlue",Qt::darkBlue);
   tolua_constant(tolua_S,"darkCyan",Qt::darkCyan);
   tolua_constant(tolua_S,"darkMagenta",Qt::darkMagenta);
   tolua_constant(tolua_S,"darkYellow",Qt::darkYellow);
   tolua_constant(tolua_S,"transparent",Qt::transparent);
   tolua_constant(tolua_S,"NoBrush",Qt::NoBrush);
   tolua_constant(tolua_S,"SolidPattern",Qt::SolidPattern);
   tolua_constant(tolua_S,"Dense1Pattern",Qt::Dense1Pattern);
   tolua_constant(tolua_S,"Dense2Pattern",Qt::Dense2Pattern);
   tolua_constant(tolua_S,"Dense3Pattern",Qt::Dense3Pattern);
   tolua_constant(tolua_S,"Dense4Pattern",Qt::Dense4Pattern);
   tolua_constant(tolua_S,"Dense5Pattern",Qt::Dense5Pattern);
   tolua_constant(tolua_S,"Dense6Pattern",Qt::Dense6Pattern);
   tolua_constant(tolua_S,"Dense7Pattern",Qt::Dense7Pattern);
   tolua_constant(tolua_S,"HorPattern",Qt::HorPattern);
   tolua_constant(tolua_S,"VerPattern",Qt::VerPattern);
   tolua_constant(tolua_S,"CrossPattern",Qt::CrossPattern);
   tolua_constant(tolua_S,"BDiagPattern",Qt::BDiagPattern);
   tolua_constant(tolua_S,"FDiagPattern",Qt::FDiagPattern);
   tolua_constant(tolua_S,"DiagCrossPattern",Qt::DiagCrossPattern);
   tolua_constant(tolua_S,"LinearGradientPattern",Qt::LinearGradientPattern);
   tolua_constant(tolua_S,"RadialGradientPattern",Qt::RadialGradientPattern);
   tolua_constant(tolua_S,"ConicalGradientPattern",Qt::ConicalGradientPattern);
   tolua_constant(tolua_S,"TexturePattern",Qt::TexturePattern);
  tolua_endmodule(tolua_S);
  #ifdef __cplusplus
  tolua_cclass(tolua_S,"QBrush","QBrush","",tolua_collect_QBrush);
  #else
  tolua_cclass(tolua_S,"QBrush","QBrush","",NULL);
  #endif
  tolua_beginmodule(tolua_S,"QBrush");
   tolua_function(tolua_S,"new",tolua_luaQBrush_QBrush_new00);
   tolua_function(tolua_S,"new_local",tolua_luaQBrush_QBrush_new00_local);
   tolua_function(tolua_S,".call",tolua_luaQBrush_QBrush_new00_local);
   tolua_function(tolua_S,"new",tolua_luaQBrush_QBrush_new01);
   tolua_function(tolua_S,"new_local",tolua_luaQBrush_QBrush_new01_local);
   tolua_function(tolua_S,".call",tolua_luaQBrush_QBrush_new01_local);
   tolua_function(tolua_S,"new",tolua_luaQBrush_QBrush_new02);
   tolua_function(tolua_S,"new_local",tolua_luaQBrush_QBrush_new02_local);
   tolua_function(tolua_S,".call",tolua_luaQBrush_QBrush_new02_local);
   tolua_function(tolua_S,"new",tolua_luaQBrush_QBrush_new03);
   tolua_function(tolua_S,"new_local",tolua_luaQBrush_QBrush_new03_local);
   tolua_function(tolua_S,".call",tolua_luaQBrush_QBrush_new03_local);
   tolua_function(tolua_S,"new",tolua_luaQBrush_QBrush_new04);
   tolua_function(tolua_S,"new_local",tolua_luaQBrush_QBrush_new04_local);
   tolua_function(tolua_S,".call",tolua_luaQBrush_QBrush_new04_local);
   tolua_function(tolua_S,"new",tolua_luaQBrush_QBrush_new05);
   tolua_function(tolua_S,"new_local",tolua_luaQBrush_QBrush_new05_local);
   tolua_function(tolua_S,".call",tolua_luaQBrush_QBrush_new05_local);
   tolua_function(tolua_S,"new",tolua_luaQBrush_QBrush_new06);
   tolua_function(tolua_S,"new_local",tolua_luaQBrush_QBrush_new06_local);
   tolua_function(tolua_S,".call",tolua_luaQBrush_QBrush_new06_local);
   tolua_function(tolua_S,"new",tolua_luaQBrush_QBrush_new07);
   tolua_function(tolua_S,"new_local",tolua_luaQBrush_QBrush_new07_local);
   tolua_function(tolua_S,".call",tolua_luaQBrush_QBrush_new07_local);
   tolua_function(tolua_S,"new",tolua_luaQBrush_QBrush_new08);
   tolua_function(tolua_S,"new_local",tolua_luaQBrush_QBrush_new08_local);
   tolua_function(tolua_S,".call",tolua_luaQBrush_QBrush_new08_local);
   tolua_function(tolua_S,"new",tolua_luaQBrush_QBrush_new09);
   tolua_function(tolua_S,"new_local",tolua_luaQBrush_QBrush_new09_local);
   tolua_function(tolua_S,".call",tolua_luaQBrush_QBrush_new09_local);
   tolua_function(tolua_S,"delete",tolua_luaQBrush_QBrush_delete00);
   tolua_function(tolua_S,".QVariant",tolua_luaQBrush_QBrush__QVariant00);
   tolua_function(tolua_S,"style",tolua_luaQBrush_QBrush_style00);
   tolua_function(tolua_S,"setStyle",tolua_luaQBrush_QBrush_setStyle00);
   tolua_function(tolua_S,"color",tolua_luaQBrush_QBrush_color00);
   tolua_function(tolua_S,"setColor",tolua_luaQBrush_QBrush_setColor00);
   tolua_function(tolua_S,"setColor",tolua_luaQBrush_QBrush_setColor01);
   tolua_function(tolua_S,"gradient",tolua_luaQBrush_QBrush_gradient00);
   tolua_function(tolua_S,"isOpaque",tolua_luaQBrush_QBrush_isOpaque00);
   tolua_function(tolua_S,"isDetached",tolua_luaQBrush_QBrush_isDetached00);
  tolua_endmodule(tolua_S);
 tolua_endmodule(tolua_S);
 return 1;
}


#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
 TOLUA_API int luaopen_luaQBrush (lua_State* tolua_S) {
 return tolua_luaQBrush_open(tolua_S);
};
#endif

